﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="./css/login.css">
    <script type="text/javascript" src="./jquery.js"></script>
</head>
<body>
<div class="login">
    <div class="login_title">
        <p>国家粮食储备库粮油配送系统</p>
    </div>
    <div class="login_main">
        <div class="main_left"></div>
        <div class="main_right">
            <div class="right_title">用户登录</div>
            <form action="">
                <div class="username">
                    <img src="./img/username.png" alt="">
                    <input type="text" class="name" placeholder="请输入用户名">
                </div>
                <div class="password">
                    <img src="./img/password.png" alt="">
                    <input type="password" class="pwd" placeholder="请输入密码">
                </div>
                <div class="code">
                    <img src="./img/code.png" alt="">
                    <input type="text" placeholder="请输入验证码">
                    <div class="code_img">
                        <img src="./img/code_img.png" alt="">
                    </div>
                </div>
                <div class="yes_login"><a>登&nbsp;&nbsp;&nbsp;&nbsp;录</a></div>
            </form>
        </div>
    </div>
    <div class="login_footer">
        <!--<p class="name">北京XXXX信息科技有限公司&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京ICP：京B2-20170028</p>-->
        <!--<p>联系电话：18588888888&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010-2888888</p>-->
        <!-- <p>建议浏览器：IE9以上、Firefox v22</p> -->
    </div>
</div>
<script type="text/javascript">
    // $(function() {
        // $(function () {
            // var username = cookie.get('username');//获取cookie
            // var password = cookie.get('password');
            // $('.name').val(username);//将input框中的内容填上
            // $('.pwd').val(password);
            // if (cookie.get('logined') == 1) {//如果设置了这个'logined'cookie
            //     location.href = 'http://localhost/cangchu1/';//则跳转到登录成功界面
            // }
        // })
    $('.yes_login').click(function () {
        if ($('.name').val() == 'admin' && $('.pwd').val() == 'admin') {
            //cookie.set('logined', 1);
			
            alert('登陆成功！');
            location.href = '../index.html'
			document.cookie="username=admin;path=/";
        } else {
            alert('用户名或密码输入错误！');
        }
		
    });
    // })
    
</script>

</body>
</html>